# !/bin/bash

# for the plot_data() function.
. /home/bmort/Thesis/spectCleanGui/scripts/plotting/plot_data.sh


# Titles
# ------------------------------------------------------------------------------
t1="Time Series"
t2="Dirty Spectrum"
t3="Spectral Window"
t4="Clean Spectrum"

# Axis labels
# ------------------------------------------------------------------------------
xL1="Time [Julian Days]"
xL2="Frequency [days^{-1}]"
xL3="Periodicity [days]"
yL1="Derived Speed [c]"
yL2="FT(z_{+} + z_{-})"
yL3="Amplitude"

# Data paths
# ------------------------------------------------------------------------------
pdir=`pwd`/plots-l200-g01
dir=`pwd`/l200-g01
time=speeds2004.dat
dirty=${dir}/dirty_0.spect
window=${dir}/window_0.spect
clean=${dir}/clean_residual_0.spect


plot_data "t" $time ${pdir}/time       "$t1" "$xL1" "$yL1" 2453245 2453276
plot_data "s" $dirty ${pdir}/dirty     "$t2" "$xL2" "$yL2" 0.0 0.6
plot_data "a" $window ${pdir}/window   "$t3" "$xL2" "$yL3" 0.0 1.2
plot_data "s" $clean ${pdir}/clean     "$t4" "$xL2" "$yL2" 0.0 0.6
plot_data "p" $clean ${pdir}/cleanP1     "$t4" "$xL3" "$yL2" 2 30
plot_data "p" $clean ${pdir}/cleanP2     "$t4" "$xL3" "$yL2" 5 20
plot_data "p" $clean ${pdir}/cleanP3     "$t4" "$xL3" "$yL2" 10 15
plot_data "p" $clean ${pdir}/cleanP3     "$t4" "$xL3" "$yL2" 12 13.5

